Check if a given pair of Numbers are Betrothed numbers or not
Given two positive numbers N and M, the task is to check whether the given pairs of numbers (N, M) form a Betrothed Numbers or not. Examples:...
read more
Abnormal behavior of floating point and double values
Float is a 32 bit IEEE 754 single-precision Floating Point Number 1 bit for the sign, (8 bits for the exponent, and 23* for the value), i.e. float has 7 decimal digits of precision....
read more
Making your own Linux Shell in C
To know more about what a shell is, click here....
read more
Named Pipe or FIFO with example C program
In computing, a named pipe (also known as a FIFO) is one of the methods for inter-process communication....
read more
Splint — A C program verifier
C compiler is pretty vague in many aspects of checking program correctness, particularly in type checking. Careful use of prototyping of functions can assist modern C compilers in this task. However, there is still no guarantee that once you have successfully compiled your program that it will run correctly....
read more
Maximize the number by rearranging bits
Given an unsigned number, find the maximum number that could be formed by using the bits of the given unsigned number....
read more
How to Add an Element to an Array of Structs in C?
In C, a struct is a user-defined data type that allows the users to group related data in a single object. An array of structs allows to store multiple structs in contiguous memory locations. In this article, we will learn how to add an element to an array of structs in C....
read more
Modulo Operator (%) in C/C++ with Examples
In C or C++, the modulo operator (also known as the modulus operator), denoted by %, is an arithmetic operator. The modulo division operator produces the remainder of an integer division which is also called the modulus of the operation....
read more
Functions in C++
A function is a set of statements that takes input, does some specific computation, and produces output. The idea is to put some commonly or repeatedly done tasks together to make a function so that instead of writing the same code again and again for different inputs, we can call this function.In simple terms, a function is a block of code that runs only when it is called....
read more
Exception Handling in C++
In C++, exceptions are runtime anomalies or abnormal conditions that a program encounters during its execution. The process of handling these exceptions is called exception handling. Using the exception handling mechanism, the control from one part of the program where the exception occurred can be transferred to another part of the code....
read more
Multiple Inheritance in C++
Multiple Inheritance is a feature of C++ where a class can inherit from more than one classes.  The constructors of inherited classes are called in the same order in which they are inherited. For example, in the following program, B’s constructor is called before A’s constructor....
read more
‘this’ pointer in C++
To understand ‘this’ pointer, it is important to know how objects look at functions and data members of a class....
read more